package com.DHH.Entity.Order;
import com.DHH.Entity.Base.BaseUser;
import com.DHH.Entity.Device.Device;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

/**
 * 实体类OrderInfo
 * 数据表order_tb_info
 * 订单信息
 * 2017-8-3 12:33:07
 * @author Administrator
 *
 */
@Table(name = "order_tb_info")
public class OrderInfo  implements Serializable {

	//
	@Id
	@GeneratedValue(generator = "JDBC")
	private Integer id;
	//
	@Length(max = 18, min = 0, message = "长度为0-18个字符")
	private String orderNumber;
	//
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8:00")
	private Date startTime;
	//
	@NotNull(message = "不能为空")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8:00")
	private Date endTime;
	//
	private Float money;
	//
	private Integer userId;
	//状态
	private Integer stateId;
	//使用时长
	private Integer duration;
	//设备编号
	private String deviceId;
	//
	private Integer disabled;
	@Transient
	private BaseUser baseUser;
	@Transient
	private OrderInfoState orderInfoState;
	@Transient
	private Device device;
	public OrderInfo(){

	}

	@Override
	public String toString() {
		return "OrderInfo{" +
				"id=" + id +
				", orderNumber='" + orderNumber + '\'' +
				", startTime=" + startTime +
				", endTime=" + endTime +
				", money=" + money +
				", userId=" + userId +
				", stateId=" + stateId +
				", duration=" + duration +
				", deviceId='" + deviceId + '\'' +
				", disabled=" + disabled +
				", baseUser=" + baseUser +
				", orderInfoState=" + orderInfoState +
				", device=" + device +
				'}';
	}

	public void setId(Integer id){
		this.id=id;
	}

	public Integer getId(){
		return this.id;
	}
	public void setOrderNumber(String orderNumber){
		this.orderNumber=orderNumber;
	}

	public String getOrderNumber(){
		return this.orderNumber;
	}
	public void setStartTime(Date startTime){
		this.startTime=startTime;
	}

	public Date getStartTime(){
		return this.startTime;
	}
	public void setEndTime(Date endTime){
		this.endTime=endTime;
	}

	public Date getEndTime(){
		return this.endTime;
	}
	public void setMoney(Float money){
		this.money=money;
	}

	public Float getMoney(){
		return this.money;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}

	public Integer getUserId(){
		return this.userId;
	}
	public void setStateId(Integer stateId){
		this.stateId=stateId;
	}

	public Integer getStateId(){
		return this.stateId;
	}
	public void setDuration(Integer duration){
		this.duration=duration;
	}

	public Integer getDuration(){
		return this.duration;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public void setDisabled(Integer disabled){
		this.disabled=disabled;
	}

	public Integer getDisabled(){
		return this.disabled;
	}

	public BaseUser getBaseUser() {
		return baseUser;
	}

	public void setBaseUser(BaseUser baseUser) {
		this.baseUser = baseUser;
	}

	public OrderInfoState getOrderInfoState() {
		return orderInfoState;
	}

	public void setOrderInfoState(OrderInfoState orderInfoState) {
		this.orderInfoState = orderInfoState;
	}

	public Device getDevice() {
		return device;
	}

	public void setDevice(Device device) {
		this.device = device;
	}
}
